Instance Methods

The following instance methods are available globally.

  • Returns MinMaxLonLat of this collection’s coordinates.

    Declaration

    Swift

    public func minMaxLatLon() -> MinMaxLatLon?

    Return Value

    MinMaxLonLat of this collection’s coordinates. Will return nil iff there are no coordinates in this collection.

  • Returns centroid of polygon with this list of coordinates.

    Declaration

    Swift

    public func centroid() -> CLLocationCoordinate2D

    Return Value

    Centroid of polygon formed by this list of coordinates.

  • Returns whether point at given coordinates is contained in this polygon or not.

    Declaration

    Swift

    public func contains(pointAt coordinates: CLLocationCoordinate2D) -> Bool

    Parameters

    coordinates

    Coordinates of point to be checked.

    Return Value

    true if point is contained in this polygon.

  • Returns coordinates of points of this polygon.

    Declaration

    Swift

    public func coordinates() -> [CLLocationCoordinate2D]
  • Returns MinMaxLonLat covered by polygons in this collection.

    Declaration

    Swift

    public func minMaxLatLon() -> MinMaxLatLon?

    Return Value

    MinMaxLonLat covered by polygons in this collection. nil iff collection has no polygons.

  • Returns WKT multipolygon for this polygon.

    Declaration

    Swift

    public func wktMultipolygonString() -> String
  • Returns WKT polygon without type declaration, useful to combine this to create complex multipolygons.

    Declaration

    Swift

    internal func wktPolygonString() -> String
  • Returns multipolygon for this collection of polygons.

    Declaration

    Swift

    public func wktMultipolygonString() -> String